Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libxml2: 2.12.7 → 2.13.2 #326637

Merged
merged 2 commits into from
Jul 13, 2024
Merged

libxml2: 2.12.7 → 2.13.2 #326637

merged 2 commits into from
Jul 13, 2024

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Jul 12, 2024

Description of changes

Supersedes #319982, #324629

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

jtojnar added 2 commits July 12, 2024 21:36
- new API with per-context error handlers
- remove HTTP POST support
- zlib, lzma and HTTP disabled by default → removed `zlib`
- Meson support added → cycle, not switching right now
- docs no longer install examples and tutorial was removed → since only `xmllint` and `xmlcatalog` HTML docs remain, move them to `out`
- FTP and `xpointer()` XPath extensions deprecated

https://discourse.gnome.org/t/libxml2-2-12-8-released/21528
https://discourse.gnome.org/t/libxml2-2-13-0-released/21529
https://discourse.gnome.org/t/libxml2-2-13-1-released/21778
https://discourse.gnome.org/t/libxml2-2-13-2-released/22000

Also clean up the expression a bit and install DevHelp files to `devdoc` (previously deleted by multiple-outputs hook).
@jtojnar jtojnar changed the base branch from master to staging July 12, 2024 19:40
@ofborg ofborg bot added the 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild label Jul 13, 2024
@ofborg ofborg bot requested a review from edolstra July 13, 2024 00:02
@jtojnar jtojnar merged commit 256178a into staging Jul 13, 2024
36 of 38 checks passed
@jtojnar jtojnar deleted the libxml2 branch July 13, 2024 10:53
@trofi
Copy link
Contributor

trofi commented Jul 18, 2024

Bisect says 25bc618 libxml2: 2.12.7 → 2.13.2 broke colord build in staging as:

ERROR: Error in gtkdoc helper script:

ERROR: ['/nix/store/3bjl4a6x553igz8av394afjlb9r85p9z-gtk-doc-1.34.0/bin/gtkdoc-mkhtml', '--path=/build/colord-1.4.6/doc/api:/build/colord-1.4.6/build/doc/api', 'colord', '../colord-docs.xml'] failed with status 6
warning: failed to load external entity "../../../COPYING"

@jtojnar
Copy link
Member Author

jtojnar commented Jul 18, 2024

@trofi that sounds like an issue with the build system. Looking at the code, the path refers to build/copying since Meson does out-of-tree builds:

https://github.com/hughsie/colord/blob/4a5a8ac167f940d74b4ac6e3f588bd50b8b777ea/doc/api/colord-docs.xml#L107

The following appears to fix it:

substituteInPlace doc/api/colord-docs.xml --replace-fail "../../COPYING" "../../../COPYING"

But that is not upstreamable since build directory location is configurable.

Also for some reason, the warning actually shows correct relative path (one higher than used).

And it is not clear to me why it fails when there is a xinclude fallback.

@jtojnar
Copy link
Member Author

jtojnar commented Jul 18, 2024

Actually, might be the same as https://gitlab.gnome.org/GNOME/libxml2/-/issues/733 that affected systemd docs. We should probably backport that. Edit: Those are part of 2.13.2.

@jtojnar
Copy link
Member Author

jtojnar commented Jul 18, 2024

Opened new upstream issue: https://gitlab.gnome.org/GNOME/libxml2/-/issues/772

@trofi
Copy link
Contributor

trofi commented Jul 18, 2024

Looks like librdf_raptor2 is also affected by the same 25bc618 libxml2: 2.12.7 → 2.13.2 on staging:

$ nix build --no-link -f. -L librdf_raptor2
...
raptor2-unstable> /build/source/src/raptor_www_libxml.c: In function 'raptor_www_libxml_init':
raptor2-unstable> /build/source/src/raptor_www_libxml.c:43:3: warning: implicit declaration of function 'xmlNanoHTTPInit' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
raptor2-unstable>    43 |   xmlNanoHTTPInit();
raptor2-unstable>       |   ^~~~~~~~~~~~~~~
...
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPScanProxy'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPClose'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPReturnCode'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPRead'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPCleanup'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPMethod'
raptor2-unstable> /nix/store/2qnz8ch0m3vjgjmjy8g66ik1rrm560ki-binutils-2.42/bin/ld: libraptor2.so: undefined reference to `xmlNanoHTTPInit'
raptor2-unstable> collect2: error: ld returned 1 exit status
raptor2-unstable> make[2]: *** [src/CMakeFiles/raptor_uri_test.dir/build.make:100: src/raptor_uri_test] Error 1

@nwellnhof
Copy link

raptor2-unstable> /build/source/src/raptor_www_libxml.c:43:3: warning: implicit declaration of function 'xmlNanoHTTPInit' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
raptor2-unstable>    43 |   xmlNanoHTTPInit();

You either have to build libxml2 with HTTP or legacy support or build raptor without "www" support.

@jtojnar
Copy link
Member Author

jtojnar commented Jul 18, 2024

Fixing libraptor in #328243

Tried to apply the patch with libxml2 fix but that breaks tests: https://gitlab.gnome.org/GNOME/libxml2/-/issues/772#note_2171538

@trofi
Copy link
Contributor

trofi commented Jul 18, 2024

postgresql is also affected by 25bc618 libxml2: 2.12.7 → 2.13.2 in staging:

$ nix build --no-link -f. -L postgresql
...
postgresql>      xml                          ... FAILED      179 ms
...
postgresql> make: *** [GNUmakefile:69: check] Error 2
error: builder for '/nix/store/gvx4dp3zzq14ra5cxkfr0bh6j8jaaqax-postgresql-15.7.drv' failed with exit code 2;

@jtojnar
Copy link
Member Author

jtojnar commented Jul 18, 2024

That might be fixed by postgres/postgres@e719248
Possibly also postgres/postgres@896cd26 for future proofing.

@nwellnhof
Copy link

For Postgres, you might also need this libxml2 commit from the 2.13 branch: https://gitlab.gnome.org/GNOME/libxml2/-/commit/e30cb632e734394ddbd7bd62b57cee3586424352

There will be a 2.13.3 release next week.

vcunat added a commit that referenced this pull request Jul 20, 2024
vcunat added a commit that referenced this pull request Jul 21, 2024
@vcunat
Copy link
Member

vcunat commented Jul 25, 2024

@imincik
Copy link
Contributor

imincik commented Jul 29, 2024

Sorry, just returned from vacation. Thanks for fix.

@kirillrdy
Copy link
Member

there is also postgis failure

#331166

@jtojnar
Copy link
Member Author

jtojnar commented Aug 25, 2024

For some reason 25bc618 is the first bad commit causing runtime issues in mysqlnd PHP extensions:

$ nix-build --expr 'let pkgs = import ./. {}; in pkgs.php.withExtensions ({ all, ... }: [ all.mysqlnd ])' && result/bin/php -i | grep Warning
/nix/store/m8s2xh98lx9n30jx256qw79hfpdnx2sk-php-with-extensions-8.2.21
Warning: PHP Startup: Unable to load dynamic library '/nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so' (tried: /nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so (/nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so: undefined symbol: compress), /nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so (/nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

$ nix-build --expr 'let pkgs = import ./. {}; in pkgs.php.withExtensions ({ all, ... }: [ all.mysqli ])' && result/bin/php -i | grep Warning
/nix/store/78nn66mdmvqry6x3nv960w4rjaz6rf19-php-with-extensions-8.2.21
Warning: PHP Startup: Unable to load dynamic library '/nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so' (tried: /nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so (/nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so: undefined symbol: compress), /nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so (/nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/4gz4xg5g4j2i7yq1qsnq4sp63dmyl5s0-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/nix/store/47v522nby5yhg5dm70qb1dld0jwv29xg-php-mysqli-8.2.21/lib/php/extensions/mysqli.so' (tried: /nix/store/47v522nby5yhg5dm70qb1dld0jwv29xg-php-mysqli-8.2.21/lib/php/extensions/mysqli.so (/nix/store/47v522nby5yhg5dm70qb1dld0jwv29xg-php-mysqli-8.2.21/lib/php/extensions/mysqli.so: undefined symbol: mysqlnd_global_stats), /nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/47v522nby5yhg5dm70qb1dld0jwv29xg-php-mysqli-8.2.21/lib/php/extensions/mysqli.so.so (/nix/store/qh0311v3hwbbd8mf15kv3zmz91hq4d1c-php-8.2.21/lib/php/extensions//nix/store/47v522nby5yhg5dm70qb1dld0jwv29xg-php-mysqli-8.2.21/lib/php/extensions/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

cc @NixOS/php

Edit: Tried to re-add the propagation of zlib in case it was the issue but no luck:

$ nix-build --expr 'let pkgs = import ./. { overlays = [ (final: prev: { libxml2 = prev.libxml2.overrideAttrs (attrs: { propagatedBuildInputs = [prev.zlib]; }); }) ]; }; in pkgs.php.withExtensions ({ all, ... }: [ all.mysqlnd ])' && result/bin/php -i | grep Warning
/nix/store/xp8f9fgd1159wdi20fwwkznlz7z8lb77-php-with-extensions-8.2.21
Warning: PHP Startup: Unable to load dynamic library '/nix/store/z7jda5b5269wy85n2x2hjr35alc0jz4f-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so' (tried: /nix/store/z7jda5b5269wy85n2x2hjr35alc0jz4f-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so (/nix/store/z7jda5b5269wy85n2x2hjr35alc0jz4f-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so: undefined symbol: compress), /nix/store/sxw3pmri2vbl9kfdh0772kfwjpz2kchv-php-8.2.21/lib/php/extensions//nix/store/z7jda5b5269wy85n2x2hjr35alc0jz4f-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so (/nix/store/sxw3pmri2vbl9kfdh0772kfwjpz2kchv-php-8.2.21/lib/php/extensions//nix/store/z7jda5b5269wy85n2x2hjr35alc0jz4f-php-mysqlnd-8.2.21/lib/php/extensions/mysqlnd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Edit: I forgot symbols use a single namespace, resolved in #337380.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants